import React from "react";
import { Consumer } from "../com/com"; //引入Consumer

class son extends React.Component {
  render() {
    return (
      <Consumer>
        {(value) => <h1>我是接收祖辈的值：{value}</h1>}
      </Consumer>
      //   <Consumer>
      //   {value => /* 基于 context 值进行渲染*/}
      // </Consumer>
    );
  }
}
export default son;
